<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>订单结算 - Surreal Gallery 超现实主义数字藏品平台</title>
    <!-- 引入Font Awesome 6.4.0图标库 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        /* 继承首页样式变量 */
        :root {
            --primary: #6a11cb;
            --secondary: #2575fc;
            --accent: #ff2e63;
            --dark: #1a1a2e;
            --light: #f0f0f0;
            --surreal-purple: #8a2be2;
            --surreal-blue: #00b4d8;
            --surreal-pink: #ff6b6b;
            --surreal-yellow: #f9d423;
            --surreal-green: #2ecc71;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: linear-gradient(135deg, var(--dark) 0%, #16213e 100%);
            color: var(--light);
            overflow-x: hidden;
            min-height: 100vh;
        }

        /* 超现实主义背景元素 */
        .floating-elements {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
        }

        .floating-element {
            position: absolute;
            border-radius: 50%;
            opacity: 0.1;
            filter: blur(40px);
            animation: float 15s infinite ease-in-out;
        }

        .floating-element:nth-child(1) {
            width: 300px;
            height: 300px;
            background: var(--surreal-purple);
            top: 10%;
            left: 5%;
            animation-delay: 0s;
        }

        .floating-element:nth-child(2) {
            width: 200px;
            height: 200px;
            background: var(--surreal-blue);
            top: 60%;
            right: 10%;
            animation-delay: 3s;
        }

        .floating-element:nth-child(3) {
            width: 250px;
            height: 250px;
            background: var(--surreal-pink);
            bottom: 10%;
            left: 20%;
            animation-delay: 6s;
        }

        @keyframes float {

            0%,
            100% {
                transform: translateY(0) rotate(0deg);
            }

            50% {
                transform: translateY(-20px) rotate(180deg);
            }
        }

        /* 导航栏 */
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 5%;
            position: fixed;
            width: 100%;
            z-index: 1000;
            background: rgba(26, 26, 46, 0.8);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .logo {
            font-size: 28px;
            font-weight: 700;
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            text-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
        }

        nav ul {
            display: flex;
            list-style: none;
        }

        nav ul li {
            margin-left: 30px;
        }

        nav ul li a {
            color: var(--light);
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            position: relative;
        }

        nav ul li a:hover {
            color: var(--surreal-pink);
        }

        nav ul li a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -5px;
            left: 0;
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue));
            transition: width 0.3s ease;
        }

        nav ul li a:hover::after {
            width: 100%;
        }

        .cta-button {
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue));
            color: white;
            border: none;
            padding: 10px 25px;
            border-radius: 30px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(106, 17, 203, 0.4);
        }

        .cta-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(106, 17, 203, 0.6);
        }

        /* 页面标题区域 */
        .page-header {
            padding: 150px 5% 80px;
            text-align: center;
            position: relative;
        }

        .page-title {
            font-size: 3.5rem;
            margin-bottom: 20px;
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue), var(--surreal-pink));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            line-height: 1.2;
        }

        .page-subtitle {
            font-size: 1.2rem;
            max-width: 600px;
            margin: 0 auto;
            opacity: 0.8;
            line-height: 1.6;
        }

        /* 订单结算容器 */
        .checkout-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 5% 100px;
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 40px;
        }

        /* 结算步骤指示器 */
        .checkout-steps {
            display: flex;
            justify-content: space-between;
            margin-bottom: 40px;
            position: relative;
        }

        .checkout-steps::before {
            content: '';
            position: absolute;
            top: 20px;
            left: 0;
            right: 0;
            height: 2px;
            background: rgba(255, 255, 255, 0.1);
            z-index: 1;
        }

        .step {
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            z-index: 2;
        }

        .step-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 10px;
            transition: all 0.3s ease;
        }

        .step.active .step-icon {
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue));
            box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
        }

        .step.completed .step-icon {
            background: var(--surreal-green);
        }

        .step-label {
            font-size: 0.9rem;
            opacity: 0.7;
            transition: all 0.3s ease;
        }

        .step.active .step-label {
            opacity: 1;
            font-weight: 600;
        }

        /* 结算表单区域 */
        .checkout-form {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 20px;
            padding: 30px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .form-section {
            margin-bottom: 40px;
        }

        .section-title {
            font-size: 1.5rem;
            margin-bottom: 20px;
            color: var(--surreal-blue);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .section-title i {
            font-size: 1.2rem;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .form-input {
            width: 100%;
            padding: 12px 15px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.05);
            color: var(--light);
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--surreal-purple);
            box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

        /* 支付方式选择 */
        .payment-methods {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .payment-method {
            display: flex;
            align-items: center;
            padding: 15px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .payment-method:hover {
            border-color: var(--surreal-purple);
            background: rgba(138, 43, 226, 0.05);
        }

        .payment-method.active {
            border-color: var(--surreal-purple);
            background: rgba(138, 43, 226, 0.1);
        }

        .payment-method input {
            margin-right: 15px;
        }

        .payment-icon {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            font-size: 1.2rem;
        }

        .payment-info {
            flex-grow: 1;
        }

        .payment-name {
            font-weight: 600;
            margin-bottom: 5px;
        }

        .payment-desc {
            font-size: 0.9rem;
            opacity: 0.7;
        }

        /* 优惠券区域 */
        .coupon-section {
            display: flex;
            gap: 10px;
        }

        .coupon-input {
            flex-grow: 1;
        }

        .apply-coupon {
            background: rgba(255, 255, 255, 0.1);
            color: var(--light);
            border: 1px solid rgba(255, 255, 255, 0.2);
            padding: 0 20px;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .apply-coupon:hover {
            background: rgba(138, 43, 226, 0.1);
            border-color: var(--surreal-purple);
        }

        /* 订单摘要 */
        .order-summary {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 20px;
            padding: 30px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            height: fit-content;
            position: sticky;
            top: 120px;
        }

        .order-item {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .order-item:last-child {
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
        }

        .item-image {
            width: 80px;
            height: 80px;
            border-radius: 10px;
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
            color: white;
            flex-shrink: 0;
        }

        .item-details {
            flex-grow: 1;
        }

        .item-name {
            font-weight: 600;
            margin-bottom: 5px;
        }

        .item-artist {
            font-size: 0.9rem;
            opacity: 0.7;
            margin-bottom: 5px;
        }

        .item-price {
            font-weight: 700;
            color: var(--surreal-pink);
        }

        .price-breakdown {
            margin: 25px 0;
        }

        .price-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
        }

        .price-row.total {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 15px;
            margin-top: 15px;
            font-size: 1.2rem;
            font-weight: 700;
        }

        .price-row.discount {
            color: var(--surreal-green);
        }

        /* 安全提示 */
        .security-notice {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 20px;
            padding: 15px;
            background: rgba(46, 204, 113, 0.1);
            border-radius: 10px;
            border: 1px solid rgba(46, 204, 113, 0.3);
        }

        .security-notice i {
            color: var(--surreal-green);
            font-size: 1.2rem;
        }

        /* 页脚 */
        footer {
            background: rgba(0, 0, 0, 0.5);
            padding: 50px 5% 20px;
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 40px;
            margin-bottom: 40px;
        }

        .footer-column h3 {
            font-size: 1.2rem;
            margin-bottom: 20px;
            color: var(--surreal-blue);
        }

        .footer-column ul {
            list-style: none;
        }

        .footer-column ul li {
            margin-bottom: 10px;
        }

        .footer-column ul li a {
            color: var(--light);
            text-decoration: none;
            opacity: 0.7;
            transition: all 0.3s ease;
        }

        .footer-column ul li a:hover {
            opacity: 1;
            color: var(--surreal-pink);
        }

        .social-links {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }

        .social-link {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .social-link:hover {
            background: var(--surreal-purple);
            transform: translateY(-3px);
        }

        .social-links a {
            text-decoration: none;
            color: #fff;
        }

        .copyright {
            text-align: center;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            opacity: 0.7;
        }

        /* 响应式设计 */
        @media (max-width: 968px) {
            .page-title {
                font-size: 2.8rem;
            }

            .checkout-container {
                grid-template-columns: 1fr;
            }

            .order-summary {
                position: static;
            }
        }

        @media (max-width: 768px) {
            nav ul {
                display: none;
            }

            .page-header {
                padding: 130px 5% 60px;
            }

            .page-title {
                font-size: 2.2rem;
            }

            .form-row {
                grid-template-columns: 1fr;
            }

            .checkout-steps {
                flex-wrap: wrap;
                gap: 20px;
            }

            .step {
                flex: 1;
                min-width: 100px;
            }
        }
    </style>
</head>

<body>
    <!-- 超现实主义背景元素 -->
    <div class="floating-elements">
        <div class="floating-element"></div>
        <div class="floating-element"></div>
        <div class="floating-element"></div>
    </div>

    <!-- 导航栏 -->
    <header>
        <div class="logo">Surreal Gallery</div>
        <nav>
            <ul>
                <li><a href="index.html">首页</a></li>
                <li><a href="collections.html">数字藏品</a></li>
                <li><a href="artists.html">艺术家</a></li>
                <li><a href="news.html">新闻动态</a></li>
                <li><a href="#faq">常见问题</a></li>
            </ul>
        </nav>
        <button class="cta-button">连接钱包</button>
    </header>

    <!-- 页面标题区域 -->
    <section class="page-header">
        <h1 class="page-title">订单结算</h1>
        <p class="page-subtitle">确认您的订单信息并完成支付，即将拥有独一无二的超现实主义数字藏品</p>
    </section>

    <!-- 订单结算容器 -->
    <section class="checkout-container">
        <!-- 结算表单区域 -->
        <div class="checkout-main">
            <form class="checkout-form">
                <!-- 结算步骤指示器 -->
                <div class="checkout-steps">
                    <div class="step completed">
                        <div class="step-icon"><i class="fas fa-shopping-cart"></i></div>
                        <span class="step-label">购物车</span>
                    </div>
                    <div class="step active">
                        <div class="step-icon"><i class="fas fa-credit-card"></i></div>
                        <span class="step-label">结算支付</span>
                    </div>
                    <div class="step">
                        <div class="step-icon"><i class="fas fa-check-circle"></i></div>
                        <span class="step-label">完成订单</span>
                    </div>
                </div>
                <!-- 联系信息 -->
                <div class="form-section">
                    <h3 class="section-title"><i class="fas fa-user"></i> 联系信息</h3>
                    <div class="form-group">
                        <label class="form-label" for="email">电子邮箱</label>
                        <input type="email" id="email" class="form-input" placeholder="your@email.com" required>
                    </div>
                </div>

                <!-- 支付方式 -->
                <div class="form-section">
                    <h3 class="section-title"><i class="fas fa-credit-card"></i> 支付方式</h3>
                    <div class="payment-methods">
                        <label class="payment-method active">
                            <input type="radio" name="payment" value="crypto" checked>
                            <div class="payment-icon"><i class="fab fa-ethereum"></i></div>
                            <div class="payment-info">
                                <div class="payment-name">加密货币支付</div>
                                <div class="payment-desc">使用ETH、BTC或其他加密货币支付</div>
                            </div>
                        </label>
                        <label class="payment-method">
                            <input type="radio" name="payment" value="wallet">
                            <div class="payment-icon"><i class="fas fa-wallet"></i></div>
                            <div class="payment-info">
                                <div class="payment-name">平台钱包</div>
                                <div class="payment-desc">使用您在Surreal Gallery的余额支付</div>
                            </div>
                        </label>
                        <label class="payment-method">
                            <input type="radio" name="payment" value="card">
                            <div class="payment-icon"><i class="fas fa-credit-card"></i></div>
                            <div class="payment-info">
                                <div class="payment-name">信用卡/借记卡</div>
                                <div class="payment-desc">使用Visa、MasterCard等信用卡支付</div>
                            </div>
                        </label>
                    </div>
                </div>

                <!-- 加密货币支付详情 -->
                <div class="form-section" id="crypto-details">
                    <h3 class="section-title"><i class="fab fa-ethereum"></i> 加密货币支付详情</h3>
                    <div class="form-group">
                        <label class="form-label" for="wallet-address">钱包地址</label>
                        <input type="text" id="wallet-address" class="form-input" placeholder="0x..." required>
                    </div>
                    <div class="form-row">
                        <div class="form-group">
                            <label class="form-label" for="crypto-type">加密货币类型</label>
                            <select id="crypto-type" class="form-input">
                                <option>ETH (以太坊)</option>
                                <option>BTC (比特币)</option>
                                <option>SOL (Solana)</option>
                                <option>MATIC (Polygon)</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label class="form-label" for="network">网络</label>
                            <select id="network" class="form-input">
                                <option>以太坊主网</option>
                                <option>Polygon</option>
                                <option>Solana</option>
                                <option>Arbitrum</option>
                            </select>
                        </div>
                    </div>
                </div>

                <!-- 优惠券 -->
                <div class="form-section">
                    <h3 class="section-title"><i class="fas fa-tag"></i> 优惠券</h3>
                    <div class="coupon-section">
                        <input type="text" class="form-input coupon-input" placeholder="输入优惠码">
                        <button type="button" class="apply-coupon">应用</button>
                    </div>
                </div>

                <!-- 协议确认 -->
                <div class="form-section">
                    <div class="form-group">
                        <label style="display: flex; align-items: flex-start; gap: 10px; cursor: pointer;">
                            <input type="checkbox" style="margin-top: 3px;">
                            <span>我同意 <a href="#" style="color: var(--surreal-blue);">服务条款</a> 和 <a href="#"
                                    style="color: var(--surreal-blue);">隐私政策</a>，并确认我拥有购买此数字藏品的合法权利。</span>
                        </label>
                    </div>
                </div>

                <!-- 提交按钮 -->
                <button type="submit" class="cta-button" style="width: 100%; padding: 15px; font-size: 1.1rem;">
                    <i class="fas fa-lock"></i> 确认支付 2.5 ETH
                </button>
            </form>
        </div>

        <!-- 订单摘要 -->
        <div class="order-summary">
            <h3 class="section-title"><i class="fas fa-receipt"></i> 订单摘要</h3>

            <!-- 订单商品 -->
            <div class="order-item">
                <div class="item-image"><i class="fas fa-horse-head"></i></div>
                <div class="item-details">
                    <div class="item-name">梦境独角兽</div>
                    <div class="item-artist">Luna Dreamer</div>
                    <div class="item-price">2.5 ETH</div>
                </div>
            </div>

            <!-- 价格明细 -->
            <div class="price-breakdown">
                <div class="price-row">
                    <span>商品价格</span>
                    <span>2.5 ETH</span>
                </div>
                <div class="price-row">
                    <span>平台服务费</span>
                    <span>0.1 ETH</span>
                </div>
                <div class="price-row discount">
                    <span>优惠折扣</span>
                    <span>-0.1 ETH</span>
                </div>
                <div class="price-row total">
                    <span>总计</span>
                    <span>2.5 ETH</span>
                </div>
            </div>

            <!-- 安全提示 -->
            <div class="security-notice">
                <i class="fas fa-shield-alt"></i>
                <span>您的交易受到区块链技术保护，安全可靠</span>
            </div>
        </div>
    </section>

    <!-- 页脚 -->
    <footer>
        <div class="footer-content">
            <div class="footer-column">
                <h3>Surreal Gallery</h3>
                <p>探索超现实数字艺术的新维度，发现独一无二的数字藏品。</p>
                <div class="social-links">
                    <a href="#" class="social-link"><i class="fab fa-facebook-f"></i></a>
                    <a href="#" class="social-link"><i class="fab fa-twitter"></i></a>
                    <a href="#" class="social-link"><i class="fab fa-instagram"></i></a>
                    <a href="#" class="social-link"><i class="fab fa-weixin"></i></a>
                </div>
            </div>
            <div class="footer-column">
                <h3>快速链接</h3>
                <ul>
                    <li><a href="index.html">首页</a></li>
                    <li><a href="collections.html">数字藏品</a></li>
                    <li><a href="artists.html">艺术家</a></li>
                    <li><a href="news.html">新闻动态</a></li>
                </ul>
            </div>
            <div class="footer-column">
                <h3>支持</h3>
                <ul>
                    <li><a href="#"><i class="fas fa-question-circle"></i> 帮助中心</a></li>
                    <li><a href="#"><i class="fas fa-envelope"></i> 联系我们</a></li>
                    <li><a href="#"><i class="fas fa-users"></i> 社区指南</a></li>
                    <li><a href="#"><i class="fas fa-file-alt"></i> 服务条款</a></li>
                </ul>
            </div>
            <div class="footer-column">
                <h3>订阅更新</h3>
                <p>订阅我们的新闻通讯，获取最新藏品和活动信息。</p>
                <form>
                    <input type="email" placeholder="您的电子邮箱"
                        style="width: 100%; padding: 10px; margin: 10px 0; border-radius: 5px; border: none; background: rgba(255,255,255,0.1); color: white;">
                    <button type="submit" class="cta-button" style="width: 100%;">订阅</button>
                </form>
            </div>
        </div>
        <div class="copyright">
            <p>&copy; 2023 Surreal Gallery. 保留所有权利。</p>
        </div>
    </footer>

    <script>
        // 支付方式切换
        document.querySelectorAll('input[name="payment"]').forEach(radio => {
            radio.addEventListener('change', function () {
                // 隐藏所有支付详情区域
                document.querySelectorAll('.form-section[id$="-details"]').forEach(section => {
                    section.style.display = 'none';
                });

                // 显示当前选中的支付方式详情
                const selectedMethod = this.value;
                const detailsSection = document.getElementById(`${selectedMethod}-details`);
                if (detailsSection) {
                    detailsSection.style.display = 'block';
                }

                // 更新支付按钮文本
                const payButton = document.querySelector('.cta-button[type="submit"]');
                if (selectedMethod === 'crypto') {
                    payButton.innerHTML = '<i class="fas fa-lock"></i> 确认支付 2.5 ETH';
                } else if (selectedMethod === 'wallet') {
                    payButton.innerHTML = '<i class="fas fa-lock"></i> 使用钱包余额支付';
                } else {
                    payButton.innerHTML = '<i class="fas fa-lock"></i> 确认支付';
                }
            });
        });

        // 初始隐藏所有支付详情，只显示加密货币详情
        document.addEventListener('DOMContentLoaded', function () {
            document.querySelectorAll('.form-section[id$="-details"]').forEach(section => {
                if (section.id !== 'crypto-details') {
                    section.style.display = 'none';
                }
            });
        });

        // 优惠券应用
        document.querySelector('.apply-coupon').addEventListener('click', function () {
            const couponInput = document.querySelector('.coupon-input');
            const couponCode = couponInput.value.trim();

            if (couponCode === '') {
                alert('请输入优惠码');
                return;
            }

            // 模拟优惠券验证
            if (couponCode === 'SURREAL10') {
                alert('优惠码应用成功！您已获得10%折扣。');
                // 这里可以添加更新价格的逻辑
            } else {
                alert('无效的优惠码，请检查后重试。');
            }
        });

        // 表单提交
        document.querySelector('.checkout-form').addEventListener('submit', function (e) {
            e.preventDefault();

            // 验证表单
            const email = document.getElementById('email').value;
            const agreement = document.querySelector('input[type="checkbox"]').checked;

            if (!email) {
                alert('请输入电子邮箱');
                return;
            }

            if (!agreement) {
                alert('请同意服务条款和隐私政策');
                return;
            }

            // 模拟支付处理
            alert('支付处理中...');

            // 这里可以添加实际的支付处理逻辑
            setTimeout(() => {
                alert('支付成功！您将很快收到您的数字藏品。');
                // 跳转到订单完成页面
                window.location.href = 'order-complete.html';
            }, 2000);
        });

        // 平滑滚动
        document.querySelectorAll('nav a').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                if (this.getAttribute('href').startsWith('#')) {
                    e.preventDefault();

                    const targetId = this.getAttribute('href');
                    const targetElement = document.querySelector(targetId);

                    if (targetElement) {
                        window.scrollTo({
                            top: targetElement.offsetTop - 80,
                            behavior: 'smooth'
                        });
                    }
                }
            });
        });
    </script>
</body>

</html>